const NODE_LIST = [
  {module: 0,id: '训练样本集',ico: 'radar-chart'},
  {module: 1,id: '数据处理',ico: 'radar-chart'},
  {module: 2,id: '变量粗筛',ico: 'radar-chart'},
  {module: 3,id: '重要性评价',ico: 'radar-chart'},
  {module: 4,id: '变量选择',ico: 'radar-chart'},
  {module: 5,id: '变量分箱',ico: 'radar-chart'},
  {module: 6,id: '生成模型',ico: 'radar-chart'},
  {module: 7,id: '评分卡生成',ico: 'radar-chart'},
  {module: 8,id: '模型评价',ico: 'radar-chart'},
]

import { cloneDeep } from 'lodash'
export const nodeInfo = modename => {
  let nodeList = cloneDeep(NODE_LIST)
  if(modename != 'AutoSC'){
    nodeList.splice(7,1)//评分卡
    nodeList.splice(5,1)//分箱
  }
  const lineList = []
  const { length:LENGTH } = nodeList
  nodeList.map((e,index)=>{
    if(index+1 < LENGTH){
      const { id:from } = e
      const { id:to } = nodeList[index+1]
      lineList.push({from,to})
    }
  })
  return {
    nodeList,
    lineList
  }
}

// console.log(nodeInfo('AutoSC'),nodeInfo('AutoGAM'))